package com.robot.console.core;

import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import com.robot.console.util.DefaultValidate;
import com.robot.console.util.Validate;

public class ClientInfo
{
	public static final int ROBOT_SEND_BUFFER_SIZE = 2048;
	public static Validate validate = new DefaultValidate();
	private final AtomicBoolean authed = new AtomicBoolean(false);
	private String devType = "";
	private int gender;
	private String roomId;
	private final AtomicBoolean roomTalk = new AtomicBoolean(false);
	private String roomType = "4";
	private AtomicLong sequenceId = new AtomicLong(0L);
	private String serverIp = "localhost";
	private int serverPort = 60000;
	private String talkMsg = "";
	private String token;
	private String toUserId;
	private String userId;
	private String uuid = "";

	public ClientInfo(String userId)
	{
		this.setUserId(userId);
	}

	public String getDevType()
	{
		return devType;
	}

	public int getGender()
	{
		return gender;
	}

	public String getRoomId()
	{
		return roomId;
	}

	public String getRoomType()
	{
		return roomType;
	}

	public AtomicLong getSequenceId()
	{
		return this.sequenceId;
	}

	public String getServerIp()
	{
		return serverIp;
	}

	public int getServerPort()
	{
		return serverPort;
	}

	public String getTalkMsg()
	{
		return talkMsg;
	}

	public String getToken()
	{
		return token;
	}

	public String getToUserId()
	{
		return toUserId;
	}

	public String getUserId()
	{
		return userId;
	}

	public String getUuid()
	{
		return uuid;
	}

	public long incrementAndGetSequenceId()
	{
		return sequenceId.incrementAndGet();
	}

	public void initRobotAttributes()
	{
	}

	public boolean isAuthed()
	{
		return authed.get();
	}

	public boolean isRoomTalk()
	{
		return roomTalk.get();
	}

	public void setAuthed(boolean authed)
	{
		this.authed.set(authed);
	}

	public void setDevType(String devType)
	{
		this.devType = devType;
	}

	public void setGender(int gender2)
	{
		gender = gender2;

	}

	public void setRoomId(String roomId)
	{
		this.roomId = roomId;
	}

	public void setRoomTalk(boolean roomTalk)
	{
		this.roomTalk.set(roomTalk);
	}

	public void setRoomType(String roomType)
	{
		this.roomType = roomType;
	}

	public void setSequenceId(long sequenceId)
	{
		this.sequenceId = new AtomicLong(sequenceId);
	}

	public void setServerIp(String serverIp)
	{
		this.serverIp = serverIp;
	}

	public void setServerPort(int serverPort)
	{
		this.serverPort = serverPort;
	}

	public void setTalkMsg(String talkMsg)
	{
		this.talkMsg = talkMsg;
	}

	public void setToken(String token)
	{
		this.token = token;
	}

	public void setToUserId(String toUserId)
	{
		this.toUserId = toUserId;
	}

	public void setUserId(String userId)
	{
		this.userId = userId;
	}

	public void setUuid(String uuid)
	{
		this.uuid = uuid;
	}
}
